[id].vue 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378
  1. <template>
  2. <div>
  3. <!-- 页面头部 -->
  4. <HomePageHead></HomePageHead>
  5. <!-- 页面导航 -->
  6. <HomePageNavigation></HomePageNavigation>
  7. <!-- 二级标题-->
  8. <HomeSecondaryHeading :titleName="routeName" :titleData="pageCategory"></HomeSecondaryHeading>
  9. <!-- {{ name }} -->
  10. <!-- 第一层 -->
  11. <div class="farmingPartOne">
  12. <div class="inner">
  13. <div class="innerLeft" v-if="pageData.length >= 1">
  14. <!-- 标题部分 -->
  15. <div class="title">
  16. <h3>
  17. {{ pageData[0].title }}
  18. <span>
  19. <NuxtLink
  20. :to="{ path: `/newsList/${pageData[0].cid}`, query: { catid: pageData[0].cid, name: pageData[0].title } }"
  21. target="_blank">查看更多</NuxtLink>
  22. </span>
  23. </h3>
  24. </div>
  25. <div class="leftTop">
  26. <div class="leftTopPhoto left">
  27. <!-- PartTwoPhoto -->
  28. <!--当pageData[0].data[0]存在的时候才渲染,如果直接渲染会导致页面找不到属性-->
  29. <img :src="pageData[0].data[0].imgurl" v-if="pageData[0].data[0]">
  30. <span v-if="pageData[0].data[0]">{{ pageData[0].data[0].title }}</span>
  31. <!-- <img :src="pageData[2].data[0].imgurl">
  32. <span></span> -->
  33. </div>
  34. <ul class="left">
  35. <li v-for="item in pageData[0].data">
  36. <em></em>
  37. <!-- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank" >{{item.title}}</NuxtLink> -->
  38. <span>
  39. <NuxtLink
  40. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  41. target="_blank">{{ item.title }}</NuxtLink>
  42. </span>
  43. </li>
  44. </ul>
  45. </div>
  46. <ul class="leftBottom">
  47. <li v-for="item in pageData[0].data2">
  48. <img :src="item.imgurl">
  49. <p>
  50. <NuxtLink
  51. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  52. target="_blank">{{ item.title }}</NuxtLink>
  53. </p>
  54. </li>
  55. </ul>
  56. </div>
  57. <div class="innerRight" v-if="pageData.length >= 2">
  58. <!-- 标题部分 -->
  59. <div class="title">
  60. <h3>
  61. {{ pageData[1].title }}
  62. <span>
  63. <NuxtLink
  64. :to="{ path: `/newsList/${pageData[1].cid}`, query: { catid: pageData[1].cid, name: pageData[1].title } }"
  65. target="_blank">查看更多</NuxtLink>
  66. </span>
  67. <!-- <span>查看更多</span> -->
  68. </h3>
  69. </div>
  70. <!-- 列表 -->
  71. <ul class="rightList">
  72. <li v-for="item in pageData[1].data">
  73. <img class="left" :src="item.imgurl">
  74. <p class="left">
  75. <NuxtLink
  76. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  77. target="_blank">
  78. {{ item.title }}
  79. </NuxtLink>
  80. </p>
  81. </li>
  82. </ul>
  83. </div>
  84. </div>
  85. </div>
  86. <!-- 三农资讯logo -->
  87. <HomeSannongzixun></HomeSannongzixun>
  88. <!-- 第二层 -->
  89. <div class="farmingPartTwo">
  90. <div class="inner">
  91. <div class="farmer" v-if="pageData.length >= 3">
  92. <!-- 标题部分 -->
  93. <div class="title">
  94. <h3>
  95. {{ pageData[2].title }}
  96. <!-- <span>查看更多</span> -->
  97. <span>
  98. <NuxtLink
  99. :to="{ path: `/newsList/${pageData[2].cid}`, query: { catid: pageData[2].cid, name: pageData[2].title } }"
  100. target="_blank">查看更多</NuxtLink>
  101. </span>
  102. </h3>
  103. </div>
  104. <div class="PartTwoPhoto" v-if="pageData[2].data[0]">
  105. <img :src="pageData[2].data[0].imgurl">
  106. <span>{{ pageData[2].data[0].title }}</span>
  107. </div>
  108. <ul class="PartTwoList">
  109. <li v-for="item in pageData[2].data">
  110. <em></em>
  111. <NuxtLink
  112. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  113. target="_blank">{{ item.title }}</NuxtLink>
  114. </li>
  115. </ul>
  116. </div>
  117. <div class="farmer" v-if="pageData.length >= 4">
  118. <!-- 标题部分 -->
  119. <div class="title">
  120. <h3>
  121. {{ pageData[3].title }}
  122. <!-- <span>查看更多</span> -->
  123. <span>
  124. <NuxtLink
  125. :to="{ path: `/newsList/${pageData[3].cid}`, query: { catid: pageData[3].cid, name: pageData[3].title } }"
  126. target="_blank">查看更多</NuxtLink>
  127. </span>
  128. </h3>
  129. </div>
  130. <div class="PartTwoPhoto" v-if="pageData[3].data[0]">
  131. <img :src="pageData[3].data[0].imgurl">
  132. <span>{{ pageData[3].data[0].title }}</span>
  133. </div>
  134. <ul class="PartTwoList">
  135. <li v-for="item in pageData[3].data">
  136. <em></em>
  137. <NuxtLink
  138. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  139. target="_blank">{{ item.title }}</NuxtLink>
  140. </li>
  141. </ul>
  142. </div>
  143. <div class="farmer" v-if="pageData.length >= 5">
  144. <!-- 标题部分 -->
  145. <div class="title">
  146. <h3>
  147. {{ pageData[4].title }}
  148. <span>
  149. <NuxtLink
  150. :to="{ path: `/newsList/${pageData[4].cid}`, query: { catid: pageData[4].cid, name: pageData[4].title } }"
  151. target="_blank">查看更多</NuxtLink>
  152. </span>
  153. </h3>
  154. </div>
  155. <div class="PartTwoPhoto" v-if="pageData[4].data[0]">
  156. <img :src="pageData[4].data[0].imgurl">
  157. <span>{{ pageData[4].data[0].title }}</span>
  158. </div>
  159. <ul class="PartTwoList">
  160. <li v-for="item in pageData[4].data">
  161. <em></em>
  162. <NuxtLink
  163. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  164. target="_blank">{{ item.title }}</NuxtLink>
  165. </li>
  166. </ul>
  167. </div>
  168. </div>
  169. </div>
  170. <!-- 三农资讯logo -->
  171. <HomeSannongzixun></HomeSannongzixun>
  172. <!-- 第三层 -->
  173. <div class="zixuntuijian">
  174. <div class="inner">
  175. <div class="innerLeft">
  176. <div class="zixunTop">
  177. <div class="zixunLeft">
  178. <!-- 标题部分 -->
  179. <div class="title">
  180. <h3>
  181. {{ pageData[5].title }}
  182. <span>
  183. <NuxtLink
  184. :to="{ path: `/newsList/${pageData[5].cid}`, query: { catid: pageData[5].cid, name: pageData[5].title } }"
  185. target="_blank">查看更多</NuxtLink>
  186. </span>
  187. </h3>
  188. </div>
  189. <!-- 图片和文字列表 160 -->
  190. <ul class="photo_text">
  191. <li v-for="(item, index) in pageData[5].data">
  192. <article v-if="index == 0">
  193. <img :src="item.imgurl" alt="">
  194. <div>
  195. <h5>
  196. <NuxtLink
  197. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  198. target="_blank">{{ item.title }}</NuxtLink>
  199. </h5>
  200. <p>
  201. <span>{{ item.author }}</span>
  202. <span>{{ item.created_at }}</span>
  203. </p>
  204. </div>
  205. </article>
  206. <article v-else>
  207. <em></em>
  208. <NuxtLink
  209. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  210. target="_blank">{{ item.title }}</NuxtLink>
  211. </article>
  212. </li>
  213. </ul>
  214. </div>
  215. <div class="zixunRight">
  216. <!-- 标题部分 -->
  217. <div class="title">
  218. <h3>
  219. {{ pageData[6].title }}
  220. <span>
  221. <NuxtLink
  222. :to="{ path: `/newsList/${pageData[6].cid}`, query: { catid: pageData[6].cid, name: pageData[6].title } }"
  223. target="_blank">查看更多</NuxtLink>
  224. </span>
  225. </h3>
  226. </div>
  227. <div class="towPic">
  228. <div v-for="(item, index) in pageData[6].data" class="picBox">
  229. <div v-if="index <= 1">
  230. <img :src="item.imgurl">
  231. </div>
  232. </div>
  233. </div>
  234. <!-- 图片和文字列表 -->
  235. <ul class="photo_text">
  236. <li v-for="(item, index) in pageData[6].data">
  237. <article v-if="index > 1">
  238. <em></em>
  239. <NuxtLink
  240. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  241. target="_blank">{{ item.title }}</NuxtLink>
  242. </article>
  243. </li>
  244. </ul>
  245. </div>
  246. </div>
  247. <div class="zixunBottom">
  248. <img class="left" :src="pageData[7].data[0].imgurl"
  249. v-if="pageData[7].data[0] && hoverStatus == 0">
  250. <img class="left" :src="pageData[7].data[1].imgurl"
  251. v-if="pageData[7].data[0] && hoverStatus == 1">
  252. <img class="left" :src="pageData[7].data[2].imgurl"
  253. v-if="pageData[7].data[0] && hoverStatus == 2">
  254. <ul class="leftList left">
  255. <li v-for="(item, index) in pageData[7].data" @mouseleave="qhPic(index)">
  256. <h4>
  257. <em></em>
  258. <NuxtLink
  259. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  260. target="_blank">{{ item.title }}</NuxtLink>
  261. </h4>
  262. <p>
  263. <NuxtLink
  264. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  265. target="_blank">{{ item.title }}</NuxtLink>
  266. </p>
  267. </li>
  268. </ul>
  269. </div>
  270. </div>
  271. <div class="innerRight">
  272. <!-- 标题部分 -->
  273. <div class="title">
  274. <h3>
  275. {{ pageData[8].title }}
  276. <span>
  277. <NuxtLink
  278. :to="{ path: `/newsList/${pageData[8].cid}`, query: { catid: pageData[8].cid, name: pageData[8].title } }"
  279. target="_blank">查看更多</NuxtLink>
  280. </span>
  281. </h3>
  282. </div>
  283. <ul class="information">
  284. <li v-for="item in pageData[8].data">
  285. <img :src="item.imgurl">
  286. <div class="text">
  287. <h5>
  288. <NuxtLink
  289. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  290. target="_blank">{{ item.title }}</NuxtLink>
  291. </h5>
  292. <p>{{ item.introduce }}</p>
  293. </div>
  294. </li>
  295. </ul>
  296. </div>
  297. </div>
  298. </div>
  299. <!-- 十强称号logo -->
  300. <HomeTopTen></HomeTopTen>
  301. <!-- 第四层 -->
  302. <div class="farming">
  303. <div class="inner">
  304. <div class="innerLeft">
  305. <div class="farmer">
  306. <h3>
  307. {{ pageData[9].title }}
  308. <span>
  309. <NuxtLink
  310. :to="{ path: `/newsList/${pageData[9].cid}`, query: { catid: pageData[9].cid, name: pageData[9].title } }"
  311. target="_blank">查看更多</NuxtLink>
  312. </span>
  313. </h3>
  314. <ul>
  315. <li v-for="item in pageData[9].data">
  316. <em></em>
  317. <span>
  318. <NuxtLink
  319. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  320. target="_blank">{{ item.title }}</NuxtLink>
  321. </span>
  322. </li>
  323. </ul>
  324. </div>
  325. <div class="farmer">
  326. <h3>
  327. {{ pageData[10].title }}
  328. <span>
  329. <NuxtLink
  330. :to="{ path: `/newsList/${pageData[10].cid}`, query: { catid: pageData[10].cid, name: pageData[10].title } }"
  331. target="_blank">查看更多</NuxtLink>
  332. </span>
  333. </h3>
  334. <ul>
  335. <li v-for="item in pageData[10].data">
  336. <em></em>
  337. <span>
  338. <NuxtLink
  339. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  340. target="_blank">{{ item.title }}</NuxtLink>
  341. </span>
  342. </li>
  343. </ul>
  344. </div>
  345. </div>
  346. <div class="innerRight">
  347. <!-- 标题部分 -->
  348. <h3>
  349. {{ pageData[11].title }}
  350. <span>
  351. <NuxtLink
  352. :to="{ path: `/newsList/${pageData[11].cid}`, query: { catid: pageData[11].cid, name: pageData[11].title } }"
  353. target="_blank">查看更多</NuxtLink>
  354. </span>
  355. </h3>
  356. <!-- 轮播图 -->
  357. <div class="banner">
  358. <HomeSmallSwiper :swiperData="pageData[11].data"></HomeSmallSwiper>
  359. </div>
  360. <!-- 轮播图下小图列表 及内容列表 -->
  361. <div class="banner_b_img">
  362. <div class="photo">
  363. <article v-for="(item, index) in pageData[11].data2">
  364. <div class="photoL" v-if="index == 0">
  365. <img :src="item.imgurl">
  366. <span>{{ item.title }}</span>
  367. </div>
  368. <div class="photoL" v-if="index == 1">
  369. <img :src="item.imgurl">
  370. <span>{{ item.title }}</span>
  371. </div>
  372. </article>
  373. </div>
  374. </div>
  375. <div class="banner_text_list">
  376. <ul>
  377. <li v-for="item in pageData[11].data3">
  378. <em></em>
  379. <span>{{ item.title }}</span>
  380. </li>
  381. </ul>
  382. </div>
  383. </div>
  384. </div>
  385. </div>
  386. <!-- 十强称号logo -->
  387. <HomeTopTenTitle></HomeTopTenTitle>
  388. <!-- 第五层 -->
  389. <div class="scienceEducation">
  390. <div class="inner">
  391. <!-- 左侧 -->
  392. <div class="innerLeft">
  393. <!-- <HomeSlider ></HomeSlider> -->
  394. <div class="slider">
  395. <!-- 标题部分 -->
  396. <div class="scienceTitle">
  397. <h5>{{ pageData[12].title }}</h5>
  398. <p class="title">
  399. <span v-if="pageData[12]" @click="qhtabs(1)">
  400. <b v-if="showTabs == 1" class="active">{{ pageData[12].title1 }}</b>
  401. <b v-else class="noSelect">{{ pageData[12].title1 }}</b>
  402. </span>
  403. <span v-if="pageData[12]" @click="qhtabs(2)">
  404. <b v-if="showTabs == 2" class="active">{{ pageData[12].title2 }}</b>
  405. <b v-else class="noSelect">{{ pageData[12].title2 }}</b>
  406. </span>
  407. <span v-if="pageData[12]" @click="qhtabs(3)">
  408. <b v-if="showTabs == 3" class="active">{{ pageData[12].title3 }}</b>
  409. <b v-else class="noSelect">{{ pageData[12].title3 }}</b>
  410. </span>
  411. <span v-if="pageData[12]" @click="qhtabs(4)">
  412. <b v-if="showTabs == 4" class="active">{{ pageData[12].title4 }}</b>
  413. <b v-else class="noSelect">{{ pageData[12].title4 }}</b>
  414. </span>
  415. </p>
  416. </div>
  417. <!-- 标题下内容列表 -->
  418. <div class="box">
  419. <div class="scienceListBox">
  420. <ul class="scienceList" v-if="showTabs == 1">
  421. <li v-for="item in pageData[12].data1">
  422. <!-- <img :src="item.imgurl"> -->
  423. <NuxtLink
  424. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  425. target="_blank"><img :src="item.imgurl"></NuxtLink>
  426. <p>
  427. <NuxtLink
  428. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  429. target="_blank">{{ item.title }}</NuxtLink>
  430. </p>
  431. </li>
  432. </ul>
  433. <ul class="scienceList" v-if="showTabs == 2">
  434. <li v-for="item in pageData[12].data2">
  435. <!-- <img :src="item.imgurl"> -->
  436. <NuxtLink
  437. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  438. target="_blank"><img :src="item.imgurl"></NuxtLink>
  439. <p>
  440. <NuxtLink
  441. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  442. target="_blank">{{ item.title }}</NuxtLink>
  443. </p>
  444. </li>
  445. </ul>
  446. <ul class="scienceList" v-if="showTabs == 3">
  447. <li v-for="item in pageData[12].data3">
  448. <!-- <img :src="item.imgurl"> -->
  449. <NuxtLink
  450. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  451. target="_blank"><img :src="item.imgurl"></NuxtLink>
  452. <p>
  453. <NuxtLink
  454. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  455. target="_blank">{{ item.title }}</NuxtLink>
  456. </p>
  457. </li>
  458. </ul>
  459. <ul class="scienceList" v-if="showTabs == 4">
  460. <li v-for="item in pageData[12].data4">
  461. <img :src="item.imgurl">
  462. <p>
  463. <NuxtLink
  464. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  465. target="_blank">{{ item.title }}</NuxtLink>
  466. </p>
  467. </li>
  468. </ul>
  469. </div>
  470. </div>
  471. </div>
  472. </div>
  473. <!-- 右侧 -->
  474. <div class="innerRight">
  475. <!-- 标题部分 -->
  476. <h3>
  477. {{ pageData[13].title }}
  478. <span>
  479. <NuxtLink
  480. :to="{ path: `/newsList/${pageData[13].cid}`, query: { catid: pageData[13].cid, name: pageData[13].title } }"
  481. target="_blank">查看更多</NuxtLink>
  482. </span>
  483. </h3>
  484. <ul class="sannongList">
  485. <li v-for="item in pageData[13].data3">
  486. <em></em>
  487. <span>
  488. <NuxtLink
  489. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  490. target="_blank">{{ item.title }}</NuxtLink>
  491. </span>
  492. </li>
  493. </ul>
  494. <!-- 轮播图 -->
  495. <div class="banner">
  496. <HomeSmallSwiper :swiperData="pageData[13].data"></HomeSmallSwiper>
  497. </div>
  498. <!-- 轮播图下小图列表 及内容列表 -->
  499. <div class="banner_b_img">
  500. <div class="photo">
  501. <article v-for="(item, index) in pageData[13].data2">
  502. <div class="photoL" v-if="index == 0">
  503. <img :src="item.imgurl">
  504. <span>
  505. <NuxtLink
  506. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  507. target="_blank">{{ item.title }}</NuxtLink>
  508. </span>
  509. </div>
  510. <div class="photoL" v-if="index == 1">
  511. <img :src="item.imgurl">
  512. <span>
  513. <NuxtLink
  514. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  515. target="_blank">{{ item.title }}</NuxtLink>
  516. </span>
  517. </div>
  518. </article>
  519. </div>
  520. </div>
  521. </div>
  522. </div>
  523. </div>
  524. <!-- 页脚部分 -->
  525. <HomeFoot></HomeFoot>
  526. </div>
  527. </template>
  528. <script setup>
  529. //获取生命周期
  530. import { onMounted } from 'vue';
  531. //获得跳转过来的id
  532. const route = useRoute();
  533. const routeId = route.params.id; //获得该页面的id
  534. const routeName = route.query.name; //获得该页面的名称
  535. //获取行政部门和地区
  536. const cityid = route.query.cityid;
  537. const depId = route.query.department_id;
  538. //获得axios
  539. const nuxtApp = useNuxtApp();
  540. const axios = nuxtApp.$axios;
  541. // 定义响应式数据
  542. const seoData = ref({
  543. title: '默认标题',
  544. description: '默认描述',
  545. keywords: '默认关键词',
  546. image: 'https://example.com/default-image.jpg'
  547. });
  548. const hoverStatus = ref(1)
  549. const qhPic = function (num) {
  550. console.log(num)
  551. hoverStatus.value = num;
  552. }
  553. // 在 onMounted 钩子中获取数据
  554. onMounted(async () => {
  555. try {
  556. const response = await axios.get("`/web/getWebsiteCategoryHead?catid=${routeId}`");
  557. const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
  558. console.log(seoData.value.title)
  559. // 更新 seoData
  560. seoData.value = {
  561. title: data.seo_title,
  562. description: data.seo_description,
  563. keywords: data.seo_keywords,
  564. image: data.seo_image
  565. };
  566. console.log(seoData.value.title)
  567. } catch (error) {
  568. console.error('获取 SEO 数据失败:', error);
  569. // 设置默认值
  570. seoData.value = {
  571. title: '默认标题',
  572. description: '默认描述',
  573. keywords: '默认关键词',
  574. image: 'https://example.com/default-image.jpg'
  575. };
  576. }
  577. });
  578. // 监听 seoData 的变化,动态设置 SEO 字段
  579. watch(seoData, (newVal) => {
  580. if (newVal.title) { // 确保 title 有值
  581. useSeoMeta({
  582. title: newVal.title, // 使用动态值
  583. description: newVal.description,
  584. ogTitle: newVal.title,
  585. ogDescription: newVal.description,
  586. ogImage: newVal.image,
  587. twitterTitle: newVal.title,
  588. twitterDescription: newVal.description,
  589. twitterImage: newVal.image,
  590. keywords: newVal.keywords
  591. });
  592. }
  593. }, { immediate: true });
  594. //该页面上所有的导航池 转为动态数据
  595. const pageCategory = ref([]);
  596. //该页面上需要渲染的所有数据
  597. const pageData = ref([
  598. { id: 0, data: [], data2: [], title: "", cid: "" },
  599. { id: 1, data: [], title: "", cid: "" },
  600. { id: 2, data: [], title: "", cid: "" },
  601. { id: 3, data: [], title: "", cid: "" },
  602. { id: 4, data: [], title: "", cid: "" },
  603. { id: 5, data: [], title: "", cid: "" },
  604. { id: 6, data: [], title: "", cid: "" },
  605. { id: 7, data: [], title: "", cid: "" },
  606. { id: 8, data: [], title: "", cid: "" },
  607. { id: 9, data: [], title: "", cid: "" },
  608. { id: 10, data: [], title: "", cid: "" },
  609. { id: 10, data: [], title: "", cid: "" },
  610. {
  611. id: 11,
  612. title: "",
  613. data: [],
  614. data1: [],
  615. data2: [],
  616. data3: [],
  617. data4: [],
  618. category_id1: "",
  619. category_id2: "",
  620. category_id3: "",
  621. category_id4: "",
  622. title1: "",
  623. title2: "",
  624. title3: "",
  625. title4: "",
  626. cid: ""
  627. },
  628. { id: 12, data1: [], data2: [], data3: [], cid: "" },
  629. ])
  630. //第一种情况 直接获得二级导航
  631. //第一步:获得该分类下的所有二级导航
  632. const newCategory = useState("getWebsiteModelCategory", () => ''); //动态数据
  633. //placeid 固定为1
  634. //pid 由上个页面带过来的1级导航id
  635. //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
  636. const getWebsiteModelCategory = async () => {
  637. try {
  638. const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${routeId}&num=${14}`);
  639. pageCategory.value = response.data;
  640. //给与板块标题
  641. for (let index in response.data) {
  642. pageData.value[index].title = response.data[index].name
  643. pageData.value[index].cid = response.data[index].category_id
  644. }
  645. console.log(pageData.value)
  646. console.log(pageCategory.value)
  647. renderPage();
  648. } catch (error) {
  649. console.error(error);
  650. }
  651. }
  652. //第二种情况 用户搜索的二级导航
  653. const searchCategory = useState("selectWebsiteCategory", () => ''); //动态数据
  654. //placeid 固定为1
  655. //pid 由上个页面带过来的1级导航id
  656. //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
  657. const selectWebsiteCategory = async () => {
  658. try {
  659. const response = await axios.get(`/web/selectWebsiteCategory?pid=${routeId}&cityid=${cityid}&department_id=${depId}`);
  660. pageCategory.value = response.data;
  661. //给与板块标题
  662. for (let index in response.data) {
  663. pageData.value[index].title = response.data[index].name
  664. }
  665. console.log(pageData.value)
  666. console.log(pageCategory.value)
  667. renderPage2();
  668. } catch (error) {
  669. console.error(error);
  670. }
  671. }
  672. //第二步:获得对应分类下的数据
  673. const renderPage = function () {
  674. console.log("当前获取到:" + pageCategory.value.length + "个导航")
  675. //循环pageCategory.value.length的次数执行getWebsiteArticlesList
  676. for (let i = 0; i <= pageCategory.value.length - 1; i++) {
  677. getWebsiteArticlesList(pageCategory.value[i].category_id, i)
  678. }
  679. }
  680. //第二步:获得搜索对应分类下的数据 - 因为字段名字不一样,这里做了一下区分
  681. const renderPage2 = function () {
  682. console.log("当前获取到:" + pageCategory.value.length + "个导航")
  683. //循环pageCategory.value.length的次数执行getWebsiteArticlesList
  684. for (let i = 0; i <= pageCategory.value.length - 1; i++) {
  685. getWebsiteArticlesList(pageCategory.value[i].id, i)
  686. }
  687. }
  688. //第三步循环获取数据
  689. const getWebsiteArticlesList = async (name, listType) => {
  690. //第一层
  691. //板块1 图文
  692. if (listType == 0) {
  693. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${8}`);
  694. pageData.value[0].data = response.data
  695. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}&placeid=${9}`);
  696. pageData.value[0].data2 = response2.data
  697. }
  698. //板块2 图文
  699. if (listType == 1) {
  700. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  701. pageData.value[1].data = response.data;
  702. }
  703. //第二层
  704. //板块3 图文
  705. if (listType == 2) {
  706. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  707. pageData.value[2].data = response.data;
  708. }
  709. //板块4 图文
  710. if (listType == 3) {
  711. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  712. pageData.value[3].data = response.data;
  713. }
  714. //板块5 图文
  715. if (listType == 4) {
  716. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  717. pageData.value[4].data = response.data;
  718. }
  719. //第三层
  720. //板块6 图文
  721. if (listType == 5) {
  722. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
  723. pageData.value[5].data = response.data;
  724. }
  725. //板块7 图文
  726. if (listType == 6) {
  727. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  728. pageData.value[6].data = response.data;
  729. }
  730. //板块8 图文
  731. if (listType == 7) {
  732. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${3}`);
  733. pageData.value[7].data = response.data;
  734. }
  735. //板块9 图文
  736. if (listType == 8) {
  737. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
  738. pageData.value[8].data = response.data;
  739. }
  740. //第四层
  741. //板块10 文字
  742. if (listType == 9) {
  743. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
  744. pageData.value[9].data = response.data;
  745. }
  746. //板块11 文字
  747. if (listType == 10) {
  748. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
  749. pageData.value[10].data = response.data;
  750. }
  751. //板块12 轮播图 图文 文字
  752. if (listType == 11) {
  753. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
  754. pageData.value[11].data = response.data;
  755. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
  756. pageData.value[11].data2 = response2.data;
  757. const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
  758. pageData.value[11].data3 = response3.data;
  759. }
  760. //第五层
  761. //板块12 多级栏目 判断下面有没有子级 如果有每个取出来 6条图文
  762. if (listType == 12) {
  763. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${10}`);
  764. pageData.value[12].data = response.data;
  765. console.log("第一步获取父级id")
  766. console.log(pageCategory.value[12].children_count)
  767. console.log(pageCategory.value[12].category_id)
  768. //判断一下里面有没有子导航
  769. if (pageCategory.value[12].children_count != 0) {
  770. //开始请求子导航
  771. const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${pageCategory.value[12].category_id}&num=${100}`);
  772. console.log("第二步获取子级数量")
  773. console.log(response.data.length)
  774. //获得标题
  775. //判断里面有几个
  776. for (let i = 1; i <= response.data.length; i++) {
  777. if (i == 1) {
  778. pageData.value[12].title1 = response.data[0].name
  779. pageData.value[12].category_id1 = response.data[0].category_id
  780. }
  781. if (i == 2) {
  782. pageData.value[12].title2 = response.data[1].name
  783. pageData.value[12].category_id2 = response.data[1].category_id
  784. }
  785. if (i == 3) {
  786. pageData.value[12].title3 = response.data[2].name
  787. pageData.value[12].category_id3 = response.data[2].category_id
  788. }
  789. if (i == 4) {
  790. pageData.value[12].title4 = response.data[3].name
  791. pageData.value[12].category_id4 = response.data[3].category_id
  792. }
  793. }
  794. //获得内容
  795. //第三步:有几个就循环几次
  796. for (let i = 1; i <= pageCategory.value[12].children_count; i++) {
  797. if (i == 1) {
  798. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id1}&level=${3}&pagesize=${6}`);
  799. pageData.value[12].data1 = response.data
  800. }
  801. if (i == 2) {
  802. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id2}&level=${3}&pagesize=${6}`);
  803. pageData.value[12].data2 = response.data
  804. }
  805. if (i == 3) {
  806. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id3}&level=${3}&pagesize=${6}`);
  807. pageData.value[12].data3 = response.data
  808. }
  809. if (i == 4) {
  810. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id4}&level=${3}&pagesize=${6}`);
  811. pageData.value[12].data4 = response.data
  812. }
  813. }
  814. }
  815. }
  816. //板块13 轮播图 图文 文字
  817. if (listType == 13) {
  818. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
  819. pageData.value[13].data = response.data;
  820. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
  821. pageData.value[13].data2 = response2.data;
  822. const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
  823. pageData.value[13].data3 = response3.data;
  824. }
  825. }
  826. let scienceTitleList = [
  827. {
  828. id: 1,
  829. title: "农产畅销"
  830. },
  831. {
  832. id: 2,
  833. title: "农业在线"
  834. },
  835. {
  836. id: 3,
  837. title: "农产行情"
  838. },
  839. {
  840. id: 4,
  841. title: "名优特产"
  842. }
  843. ]
  844. //鼠标移入标题时,下方内容会发生变化
  845. let changeUl = (index) => {
  846. // console.log(index);
  847. if (process.browser) {
  848. let scienceListBox = document.querySelector('.scienceListBox');
  849. let titleList = document.querySelectorAll('.title>span>a')
  850. for (let i = 0; i < titleList.length; i++) {
  851. titleList[i].className = ''
  852. }
  853. titleList[index].setAttribute('class', 'current')
  854. if (index == 0) {
  855. scienceListBox.style.left = 0
  856. } else if (index == 1) {
  857. scienceListBox.style.left = "-790px"
  858. } else if (index == 2) {
  859. scienceListBox.style.left = "-1580px"
  860. } else if (index == 3) {
  861. scienceListBox.style.left = "-2370px"
  862. }
  863. }
  864. }
  865. //显示哪个tabs
  866. let showTabs = ref(1)
  867. let qhtabs = function (number) {
  868. console.log(number)
  869. showTabs.value = number
  870. }
  871. //挂载成功钩子函数
  872. onMounted(() => {
  873. //判断一下应该走搜索还是直接走二级分类
  874. console.log(111111)
  875. console.log(cityid)
  876. console.log(cityid != undefined)
  877. console.log(depId != undefined)
  878. if (cityid != undefined || depId != undefined) {
  879. console.log(7777777777)
  880. console.log(cityid)
  881. console.log(depId)
  882. //获得用户搜索的导航
  883. selectWebsiteCategory()
  884. } else {
  885. console.log(888888888)
  886. //直接获得所有二级导航
  887. getWebsiteModelCategory()
  888. }
  889. })
  890. </script>
  891. <style lang="less" scoped>
  892. a {
  893. color: #333333;
  894. }
  895. //农民工part1
  896. .farmingPartOne {
  897. width: 100%;
  898. height: 600px;
  899. .inner {
  900. height: 600px;
  901. .innerLeft {
  902. height: 600px;
  903. .leftTop {
  904. margin-top: 20px;
  905. height: 320px;
  906. .leftTopPhoto {
  907. width: 387px;
  908. height: 320px;
  909. position: relative;
  910. img {
  911. width: 387px;
  912. height: 320px;
  913. }
  914. span {
  915. display: inline-block;
  916. width: 387px;
  917. height: 50px;
  918. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  919. color: #FFFFFF;
  920. position: absolute;
  921. bottom: 0;
  922. left: 0;
  923. font-family: Source Han Sans, Source Han Sans;
  924. font-weight: 500;
  925. font-size: 20px;
  926. line-height: 23px;
  927. padding-top: 11px;
  928. padding-left: 13px;
  929. box-sizing: border-box;
  930. white-space: nowrap;
  931. /* 禁止换行 */
  932. overflow: hidden;
  933. /* 隐藏超出部分 */
  934. text-overflow: ellipsis;
  935. /* 超出部分显示省略号 */
  936. }
  937. }
  938. >ul.left {
  939. margin-left: 25px;
  940. width: 362px;
  941. height: 320px;
  942. margin-top: 5px;
  943. >li {
  944. em {
  945. display: inline-block;
  946. width: 8px;
  947. height: 8px;
  948. border-radius: 8px;
  949. background-color: #d9d9d9;
  950. margin-right: 8px;
  951. vertical-align: middle;
  952. }
  953. width: 362px;
  954. height: 22px;
  955. font-family: PingFang SC,
  956. PingFang SC;
  957. font-weight: 500;
  958. font-size: 18px;
  959. color: #333333;
  960. line-height: 22px;
  961. text-align: left;
  962. font-style: normal;
  963. text-transform: none;
  964. margin-bottom: 19px;
  965. white-space: nowrap;
  966. /* 禁止换行 */
  967. overflow: hidden;
  968. /* 隐藏超出部分 */
  969. text-overflow: ellipsis;
  970. /* 超出部分显示省略号 */
  971. }
  972. >li:hover {
  973. a {
  974. color: #088f04;
  975. }
  976. color: #088f04;
  977. }
  978. >li:hover>em {
  979. background-color: #088f04;
  980. }
  981. }
  982. }
  983. .leftBottom {
  984. height: 202px;
  985. margin-top: 21px;
  986. >li {
  987. float: left;
  988. width: 185px;
  989. height: 202px;
  990. margin-right: 10px;
  991. >img {
  992. width: 185px;
  993. height: 139px;
  994. }
  995. >p {
  996. width: 185px;
  997. height: 58px;
  998. padding: 8px 5px 12px;
  999. box-sizing: border-box;
  1000. background-color: #f5f5f5;
  1001. font-family: PingFang SC, PingFang SC;
  1002. font-weight: 500;
  1003. font-size: 18px;
  1004. color: #333333;
  1005. line-height: 24px;
  1006. text-align: left;
  1007. font-style: normal;
  1008. text-transform: none;
  1009. display: -webkit-box;
  1010. -webkit-box-orient: vertical;
  1011. -webkit-line-clamp: 2;
  1012. /* 限制显示的行数 */
  1013. overflow: hidden;
  1014. text-overflow: ellipsis;
  1015. }
  1016. }
  1017. >li:hover {
  1018. a {
  1019. color: #088f04;
  1020. }
  1021. }
  1022. >li:last-child {
  1023. margin: 0;
  1024. }
  1025. }
  1026. }
  1027. .innerRight {
  1028. .rightList {
  1029. height: 540px;
  1030. margin-top: 20px;
  1031. >li {
  1032. height: 100px;
  1033. margin-bottom: 10px;
  1034. >img {
  1035. width: 150px;
  1036. height: 100px;
  1037. }
  1038. >p {
  1039. width: 219px;
  1040. height: 100px;
  1041. display: -webkit-box;
  1042. -webkit-box-orient: vertical;
  1043. -webkit-line-clamp: 4;
  1044. overflow: hidden;
  1045. text-overflow: ellipsis;
  1046. word-break: break-all;
  1047. padding-left: 12px;
  1048. font-family: PingFang SC, PingFang SC;
  1049. font-weight: 400;
  1050. font-size: 16px;
  1051. color: #333333;
  1052. line-height: 24px;
  1053. text-align: left;
  1054. font-style: normal;
  1055. text-transform: none;
  1056. }
  1057. >p:hover {
  1058. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  1059. a {
  1060. color: #088f04;
  1061. }
  1062. }
  1063. }
  1064. }
  1065. }
  1066. }
  1067. }
  1068. //农民工part2
  1069. .farmingPartTwo {
  1070. width: 100%;
  1071. height: 600px;
  1072. .inner {
  1073. width: 1200px;
  1074. height: 600px;
  1075. >.farmer {
  1076. float: left;
  1077. width: 380px;
  1078. height: 600px;
  1079. margin-right: 29px;
  1080. // 农民工part2标题
  1081. >.title {
  1082. width: 380px;
  1083. }
  1084. >.title>h3 {
  1085. height: 36px;
  1086. font-family: Source Han Sans, Source Han Sans;
  1087. font-weight: bold;
  1088. font-size: 24px;
  1089. color: #000000;
  1090. line-height: 28px;
  1091. text-align: left;
  1092. font-style: normal;
  1093. text-transform: none;
  1094. border-bottom: 1px solid #139602;
  1095. }
  1096. >.title>h3>span>a {
  1097. float: right;
  1098. width: 56px;
  1099. height: 20px;
  1100. line-height: 24px;
  1101. font-weight: 400;
  1102. font-size: 14px;
  1103. color: #999999;
  1104. font-style: normal;
  1105. text-transform: none;
  1106. }
  1107. // 农民工part2图片
  1108. .PartTwoPhoto {
  1109. width: 380px;
  1110. height: 280px;
  1111. margin-top: 20px;
  1112. position: relative;
  1113. img {
  1114. width: 380px;
  1115. height: 280px;
  1116. }
  1117. >span {
  1118. display: inline-block;
  1119. width: 380px;
  1120. height: 50px;
  1121. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  1122. color: #FFFFFF;
  1123. position: absolute;
  1124. bottom: 0;
  1125. left: 0;
  1126. font-family: Source Han Sans, Source Han Sans;
  1127. font-weight: 500;
  1128. font-size: 20px;
  1129. line-height: 23px;
  1130. padding-top: 11px;
  1131. padding-left: 13px;
  1132. box-sizing: border-box;
  1133. white-space: nowrap;
  1134. /* 禁止换行 */
  1135. overflow: hidden;
  1136. /* 隐藏超出部分 */
  1137. text-overflow: ellipsis;
  1138. /* 超出部分显示省略号 */
  1139. }
  1140. }
  1141. //农民工part2文字列表
  1142. .PartTwoList {
  1143. width: 380px;
  1144. height: 263px;
  1145. background-color: #fff;
  1146. box-shadow: 0px 4px 30px 1px rgba(174, 174, 174, 0.25);
  1147. padding-top: 20px;
  1148. box-sizing: border-box;
  1149. >li {
  1150. width: 380px;
  1151. height: 25px;
  1152. line-height: 25px;
  1153. font-family: PingFang SC, PingFang SC;
  1154. font-weight: 500;
  1155. font-size: 18px;
  1156. color: #333333;
  1157. margin-bottom: 16px;
  1158. white-space: nowrap;
  1159. /* 禁止换行 */
  1160. overflow: hidden;
  1161. /* 隐藏超出部分 */
  1162. text-overflow: ellipsis;
  1163. /* 超出部分显示省略号 */
  1164. >em {
  1165. display: inline-block;
  1166. width: 8px;
  1167. height: 8px;
  1168. background-color: #d9d9d9;
  1169. border-radius: 8px;
  1170. margin-left: 19px;
  1171. margin-right: 10px;
  1172. }
  1173. }
  1174. >li:hover {
  1175. color: #139602;
  1176. a {
  1177. color: #088f04;
  1178. }
  1179. }
  1180. >li:hover>em {
  1181. background-color: #139602;
  1182. }
  1183. }
  1184. }
  1185. >.farmer:last-child {
  1186. margin-right: 0;
  1187. }
  1188. }
  1189. }
  1190. //资讯推荐
  1191. .zixuntuijian {
  1192. width: 100%;
  1193. height: 600px;
  1194. .innerLeft {
  1195. // 左侧的上半部分
  1196. .zixunTop {
  1197. height: 286px;
  1198. .zixunLeft,
  1199. .zixunRight {
  1200. float: left;
  1201. width: 380px;
  1202. height: 286px;
  1203. .towPic {
  1204. display: flex;
  1205. width: 380px;
  1206. height: 116px;
  1207. margin-top: 20px;
  1208. .picBox {
  1209. width: 50%;
  1210. text-align: center;
  1211. }
  1212. .picBox:nth-child(3),
  1213. .picBox:nth-child(4),
  1214. .picBox:nth-child(5) {
  1215. display: none;
  1216. }
  1217. img {
  1218. width: 190px;
  1219. height: 120px;
  1220. }
  1221. .picBox:first-child {
  1222. margin-right: 5px;
  1223. }
  1224. }
  1225. // 标题部分
  1226. >.title {
  1227. width: 380px;
  1228. }
  1229. >.title>h3 {
  1230. height: 36px;
  1231. font-family: Source Han Sans, Source Han Sans;
  1232. font-weight: bold;
  1233. font-size: 24px;
  1234. color: #000000;
  1235. line-height: 28px;
  1236. text-align: left;
  1237. font-style: normal;
  1238. text-transform: none;
  1239. border-bottom: 1px solid #139602;
  1240. }
  1241. >.title>h3>span {
  1242. float: right;
  1243. width: 56px;
  1244. height: 20px;
  1245. line-height: 24px;
  1246. font-weight: 400;
  1247. font-size: 14px;
  1248. color: #999999;
  1249. font-style: normal;
  1250. text-transform: none;
  1251. }
  1252. .photo_text {
  1253. article {
  1254. white-space: nowrap;
  1255. /* 禁止换行 */
  1256. overflow: hidden;
  1257. /* 隐藏超出部分 */
  1258. text-overflow: ellipsis;
  1259. /* 超出部分显示省略号 */
  1260. li {
  1261. white-space: nowrap;
  1262. /* 禁止换行 */
  1263. overflow: hidden;
  1264. /* 隐藏超出部分 */
  1265. text-overflow: ellipsis;
  1266. /* 超出部分显示省略号 */
  1267. a:hover {
  1268. color: #088f04;
  1269. }
  1270. }
  1271. li:hover {
  1272. color: #088f04;
  1273. a {
  1274. color: #088f04;
  1275. }
  1276. }
  1277. img {
  1278. width: 100px;
  1279. }
  1280. }
  1281. li {
  1282. width: 380px;
  1283. height: 25px;
  1284. font-family: PingFang SC, PingFang SC;
  1285. font-weight: 500;
  1286. font-size: 18px;
  1287. color: #333333;
  1288. line-height: 21px;
  1289. text-align: left;
  1290. font-style: normal;
  1291. text-transform: none;
  1292. margin-bottom: 9px;
  1293. em {
  1294. display: inline-block;
  1295. width: 8px;
  1296. height: 8px;
  1297. border-radius: 8px;
  1298. margin-right: 10px;
  1299. background-color: #d9d9d9;
  1300. }
  1301. }
  1302. }
  1303. }
  1304. // 左侧的资讯推荐的左半部分
  1305. .zixunLeft {
  1306. margin-right: 30px;
  1307. .photo_text {
  1308. li:first-child {
  1309. width: 380px;
  1310. height: 120px;
  1311. margin-top: 20px;
  1312. margin-bottom: 16px;
  1313. position: relative;
  1314. img {
  1315. float: left;
  1316. width: 160px;
  1317. height: 120px;
  1318. }
  1319. div {
  1320. float: left;
  1321. width: 220px;
  1322. height: 120px;
  1323. padding-left: 15px;
  1324. padding-top: 6px;
  1325. box-sizing: border-box;
  1326. background-color: #f6f6f6;
  1327. h5 {
  1328. width: 200px;
  1329. height: 54px;
  1330. white-space: nowrap;
  1331. overflow: hidden;
  1332. text-overflow: ellipsis;
  1333. font-family: Source Han Sans, Source Han Sans;
  1334. font-weight: 500;
  1335. font-size: 18px;
  1336. color: #333333;
  1337. line-height: 26px;
  1338. text-align: left;
  1339. font-style: normal;
  1340. text-transform: none;
  1341. }
  1342. p {
  1343. width: 200px;
  1344. height: 22px;
  1345. line-height: 20px;
  1346. position: absolute;
  1347. bottom: 5px;
  1348. right: 0;
  1349. span {
  1350. display: inline-block;
  1351. width: 75px;
  1352. height: 18px;
  1353. font-family: Source Han Sans, Source Han Sans;
  1354. font-weight: 400;
  1355. font-size: 12px;
  1356. color: #999999;
  1357. text-align: left;
  1358. line-height: 14px;
  1359. font-style: normal;
  1360. text-transform: none;
  1361. }
  1362. span:last-child {
  1363. width: 90px;
  1364. text-align: right;
  1365. }
  1366. }
  1367. }
  1368. }
  1369. >li {
  1370. width: 380px;
  1371. height: 25px;
  1372. font-family: PingFang SC, PingFang SC;
  1373. font-weight: 500;
  1374. font-size: 18px;
  1375. color: #333333;
  1376. line-height: 21px;
  1377. text-align: left;
  1378. font-style: normal;
  1379. text-transform: none;
  1380. margin-bottom: 9px;
  1381. em {
  1382. display: inline-block;
  1383. width: 8px;
  1384. height: 8px;
  1385. border-radius: 8px;
  1386. margin-right: 10px;
  1387. background-color: #d9d9d9;
  1388. }
  1389. }
  1390. }
  1391. }
  1392. // 左侧的资讯推荐的右半部分
  1393. .zixunRight {
  1394. width: 380px;
  1395. height: 229px;
  1396. .photo_text {
  1397. margin-top: 20px;
  1398. >li:nth-child(1) {
  1399. display: none;
  1400. }
  1401. >li:nth-child(2) {
  1402. display: none;
  1403. }
  1404. }
  1405. }
  1406. }
  1407. //左侧的下半部分
  1408. .zixunBottom {
  1409. width: 790px;
  1410. height: 280px;
  1411. margin-top: 40px;
  1412. img {
  1413. width: 498px;
  1414. height: 280px;
  1415. }
  1416. >.leftList {
  1417. width: 290px;
  1418. height: 280px;
  1419. background-color: #f6f6f6;
  1420. padding: 11px 26px 6px 20px;
  1421. box-sizing: border-box;
  1422. >li {
  1423. width: 296px;
  1424. height: 75px;
  1425. color: #666666;
  1426. font-size: 14px;
  1427. margin-bottom: 18px;
  1428. h4 {
  1429. font-family: Source Han Sans, Source Han Sans;
  1430. height: 27px;
  1431. line-height: 21px;
  1432. font-size: 18px;
  1433. white-space: nowrap;
  1434. /* 禁止换行 */
  1435. overflow: hidden;
  1436. /* 隐藏超出部分 */
  1437. text-overflow: ellipsis;
  1438. /* 超出部分显示省略号 */
  1439. color: #333333;
  1440. width: 280px;
  1441. em {
  1442. display: inline-block;
  1443. width: 8px;
  1444. height: 8px;
  1445. background-color: #333333;
  1446. border-radius: 8px;
  1447. margin-right: 5px;
  1448. }
  1449. }
  1450. p {
  1451. width: 249px;
  1452. height: 48px;
  1453. line-height: 24px;
  1454. padding-left: 14px;
  1455. display: -webkit-box;
  1456. -webkit-box-orient: vertical;
  1457. -webkit-line-clamp: 2;
  1458. /* 限制显示的行数 */
  1459. overflow: hidden;
  1460. text-overflow: ellipsis;
  1461. }
  1462. }
  1463. >li:hover,
  1464. >li:hover>h4>a,
  1465. >li:hover>p>a {
  1466. color: #088f04;
  1467. }
  1468. >li:hover>h4>em {
  1469. background-color: #088f04;
  1470. }
  1471. }
  1472. }
  1473. }
  1474. .innerRight {
  1475. .information {
  1476. width: 380px;
  1477. margin-top: 20px;
  1478. >li {
  1479. width: 380px;
  1480. height: 120px;
  1481. margin-bottom: 21px;
  1482. img {
  1483. float: left;
  1484. width: 160px;
  1485. height: 120px;
  1486. }
  1487. .text {
  1488. float: left;
  1489. width: 220px;
  1490. height: 120px;
  1491. padding-left: 15px;
  1492. box-sizing: border-box;
  1493. >h5 {
  1494. width: 199px;
  1495. height: 43px;
  1496. white-space: nowrap;
  1497. overflow: hidden;
  1498. text-overflow: ellipsis;
  1499. padding-top: 6px;
  1500. font-family: PingFang SC, PingFang SC;
  1501. font-weight: 600;
  1502. font-size: 18px;
  1503. color: #333333;
  1504. line-height: 26px;
  1505. text-align: left;
  1506. font-style: normal;
  1507. text-transform: none;
  1508. }
  1509. >p {
  1510. width: 198px;
  1511. height: 46px;
  1512. display: -webkit-box;
  1513. -webkit-box-orient: vertical;
  1514. -webkit-line-clamp: 2;
  1515. overflow: hidden;
  1516. text-overflow: ellipsis;
  1517. word-break: break-all;
  1518. margin-top: 16px;
  1519. font-family: PingFang SC, PingFang SC;
  1520. font-weight: 400;
  1521. font-size: 14px;
  1522. color: #666666;
  1523. line-height: 24px;
  1524. text-align: left;
  1525. font-style: normal;
  1526. text-transform: none;
  1527. }
  1528. }
  1529. .text:hover {
  1530. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  1531. background-color: #fff;
  1532. h5 {
  1533. a {
  1534. color: #088f04;
  1535. }
  1536. }
  1537. p {
  1538. color: #088f04;
  1539. }
  1540. }
  1541. }
  1542. }
  1543. }
  1544. }
  1545. // 农民工
  1546. .farming {
  1547. width: 100%;
  1548. height: 605px;
  1549. // 左侧
  1550. .innerLeft {
  1551. width: 790px;
  1552. height: 605px;
  1553. margin-right: 21px;
  1554. // background-color: #ccc;
  1555. .farmer {
  1556. width: 790px;
  1557. height: 312px;
  1558. >h3 {
  1559. height: 36px;
  1560. font-family: Source Han Sans, Source Han Sans;
  1561. font-weight: bold;
  1562. font-size: 24px;
  1563. color: #000000;
  1564. line-height: 28px;
  1565. text-align: left;
  1566. font-style: normal;
  1567. text-transform: none;
  1568. border-bottom: 1px solid #139602;
  1569. >span {
  1570. float: right;
  1571. width: 56px;
  1572. height: 20px;
  1573. line-height: 24px;
  1574. font-weight: 400;
  1575. font-size: 14px;
  1576. color: #999999;
  1577. font-style: normal;
  1578. text-transform: none;
  1579. }
  1580. }
  1581. >ul {
  1582. margin-top: 20px;
  1583. >li {
  1584. float: left;
  1585. width: 362px;
  1586. height: 22px;
  1587. font-weight: 500;
  1588. font-size: 18px;
  1589. color: #333333;
  1590. line-height: 21px;
  1591. text-align: left;
  1592. margin-bottom: 29px;
  1593. margin-right: 27px;
  1594. white-space: nowrap;
  1595. /* 禁止换行 */
  1596. overflow: hidden;
  1597. /* 隐藏超出部分 */
  1598. text-overflow: ellipsis;
  1599. /* 超出部分显示省略号 */
  1600. >em {
  1601. display: inline-block;
  1602. width: 8px;
  1603. height: 8px;
  1604. background-color: #d9d9d9;
  1605. border-radius: 4px;
  1606. margin: 5px 8px 6px;
  1607. vertical-align: middle;
  1608. }
  1609. }
  1610. >li:hover {
  1611. color: #139602;
  1612. a {
  1613. color: #139602;
  1614. }
  1615. }
  1616. }
  1617. }
  1618. .farmerbottom {
  1619. width: 790px;
  1620. height: 280px;
  1621. img {
  1622. width: 498px;
  1623. height: 280px;
  1624. }
  1625. >.leftList {
  1626. width: 290px;
  1627. height: 280px;
  1628. background-color: #f6f6f6;
  1629. padding: 11px 26px 6px 20px;
  1630. box-sizing: border-box;
  1631. >li {
  1632. width: 296px;
  1633. height: 75px;
  1634. color: #666666;
  1635. font-size: 14px;
  1636. margin-bottom: 18px;
  1637. h4 {
  1638. font-family: Source Han Sans, Source Han Sans;
  1639. height: 27px;
  1640. line-height: 21px;
  1641. font-size: 18px;
  1642. color: #333333;
  1643. em {
  1644. display: inline-block;
  1645. width: 8px;
  1646. height: 8px;
  1647. background-color: #333333;
  1648. border-radius: 8px;
  1649. }
  1650. }
  1651. p {
  1652. width: 249px;
  1653. height: 48px;
  1654. line-height: 24px;
  1655. padding-left: 14px;
  1656. }
  1657. }
  1658. >li:hover,
  1659. >li:hover>h4 {
  1660. color: #088f04;
  1661. }
  1662. >li:hover>h4>em {
  1663. background-color: #088f04;
  1664. }
  1665. }
  1666. }
  1667. }
  1668. // 右侧
  1669. .innerRight {
  1670. width: 380px;
  1671. height: 605px;
  1672. // 标题部分
  1673. >h3 {
  1674. height: 36px;
  1675. font-family: Source Han Sans, Source Han Sans;
  1676. font-weight: bold;
  1677. font-size: 24px;
  1678. color: #000000;
  1679. line-height: 28px;
  1680. text-align: left;
  1681. font-style: normal;
  1682. text-transform: none;
  1683. border-bottom: 1px solid #139602;
  1684. >span {
  1685. float: right;
  1686. width: 56px;
  1687. height: 20px;
  1688. line-height: 24px;
  1689. font-weight: 400;
  1690. font-size: 14px;
  1691. color: #999999;
  1692. font-style: normal;
  1693. text-transform: none;
  1694. }
  1695. }
  1696. // 轮播图
  1697. .banner {
  1698. width: 380px;
  1699. height: 214px;
  1700. margin-top: 20px;
  1701. }
  1702. .banner_b_img {
  1703. // 图片部分
  1704. .photo {
  1705. height: 104px;
  1706. margin-top: 10px;
  1707. display: flex;
  1708. }
  1709. .photoL,
  1710. .photoR {
  1711. float: left;
  1712. width: 185px;
  1713. height: 104px;
  1714. position: relative;
  1715. img {
  1716. width: 185px;
  1717. height: 104px;
  1718. }
  1719. span {
  1720. position: absolute;
  1721. top: 0;
  1722. left: 0;
  1723. display: inline-block;
  1724. padding-left: 7px;
  1725. box-sizing: border-box;
  1726. width: 185px;
  1727. height: 22px;
  1728. background-color: rgba(0, 0, 0, 0.5);
  1729. font-weight: 500px;
  1730. font-size: 14px;
  1731. color: #FFFFFF;
  1732. line-height: 22px;
  1733. white-space: nowrap;
  1734. /* 禁止换行 */
  1735. overflow: hidden;
  1736. /* 隐藏超出部分 */
  1737. text-overflow: ellipsis;
  1738. /* 超出部分显示省略号 */
  1739. }
  1740. }
  1741. .photoL {
  1742. margin-right: 10px;
  1743. }
  1744. }
  1745. .banner_text_list {
  1746. ul {
  1747. width: 380px;
  1748. height: 186px;
  1749. margin-top: 30px;
  1750. >li {
  1751. height: 22px;
  1752. padding-bottom: 16px;
  1753. white-space: nowrap;
  1754. /* 禁止换行 */
  1755. overflow: hidden;
  1756. /* 隐藏超出部分 */
  1757. text-overflow: ellipsis;
  1758. /* 超出部分显示省略号 */
  1759. >strong {
  1760. display: inline-block;
  1761. width: 24px;
  1762. height: 24px;
  1763. line-height: 24px;
  1764. background-color: #cecece;
  1765. padding-left: 6px;
  1766. box-sizing: border-box;
  1767. font-family: Source Han Sans, Source Han Sans;
  1768. font-weight: 500;
  1769. font-size: 18px;
  1770. color: #FFFFFF;
  1771. font-style: normal;
  1772. text-transform: none;
  1773. }
  1774. >em {
  1775. display: inline-block;
  1776. width: 6px;
  1777. height: 6px;
  1778. border-radius: 10px;
  1779. border: 2px solid #8CBA86;
  1780. margin-right: 10px;
  1781. }
  1782. >span {
  1783. width: 380px;
  1784. height: 22px;
  1785. font-family: PingFang SC, PingFang SC;
  1786. font-weight: 500;
  1787. font-size: 18px;
  1788. color: #333333;
  1789. line-height: 21px;
  1790. text-align: left;
  1791. font-style: normal;
  1792. text-transform: none;
  1793. }
  1794. >span:hover {
  1795. color: #139609;
  1796. }
  1797. }
  1798. }
  1799. }
  1800. }
  1801. }
  1802. //三农科教
  1803. .scienceEducation {
  1804. height: 600px;
  1805. margin-bottom: 76px;
  1806. .innerLeft,
  1807. .innerRight {
  1808. float: left;
  1809. }
  1810. // 左侧
  1811. .innerLeft {
  1812. width: 790px;
  1813. height: 616px;
  1814. margin-right: 21px;
  1815. }
  1816. // 右侧
  1817. .innerRight {
  1818. width: 380px;
  1819. height: 600px;
  1820. // 标题部分
  1821. >h3 {
  1822. height: 36px;
  1823. font-family: Source Han Sans, Source Han Sans;
  1824. font-weight: bold;
  1825. font-size: 24px;
  1826. color: #000000;
  1827. line-height: 28px;
  1828. text-align: left;
  1829. font-style: normal;
  1830. text-transform: none;
  1831. border-bottom: 1px solid #139602;
  1832. >span {
  1833. float: right;
  1834. width: 56px;
  1835. height: 20px;
  1836. line-height: 24px;
  1837. font-weight: 400;
  1838. font-size: 14px;
  1839. color: #999999;
  1840. font-style: normal;
  1841. text-transform: none;
  1842. }
  1843. }
  1844. ul.sannongList {
  1845. width: 380px;
  1846. height: 186px;
  1847. >li {
  1848. height: 22px;
  1849. padding-top: 16px;
  1850. white-space: nowrap;
  1851. /* 禁止换行 */
  1852. overflow: hidden;
  1853. /* 隐藏超出部分 */
  1854. text-overflow: ellipsis;
  1855. /* 超出部分显示省略号 */
  1856. >strong {
  1857. display: inline-block;
  1858. width: 24px;
  1859. height: 24px;
  1860. line-height: 24px;
  1861. background-color: #cecece;
  1862. padding-left: 6px;
  1863. box-sizing: border-box;
  1864. font-family: Source Han Sans, Source Han Sans;
  1865. font-weight: 500;
  1866. font-size: 18px;
  1867. color: #FFFFFF;
  1868. font-style: normal;
  1869. text-transform: none;
  1870. }
  1871. >em {
  1872. display: inline-block;
  1873. width: 6px;
  1874. height: 6px;
  1875. border-radius: 10px;
  1876. border: 2px solid #8CBA86;
  1877. }
  1878. >span {
  1879. width: 380px;
  1880. height: 22px;
  1881. font-family: PingFang SC, PingFang SC;
  1882. font-weight: 500;
  1883. font-size: 18px;
  1884. color: #333333;
  1885. line-height: 21px;
  1886. text-align: left;
  1887. font-style: normal;
  1888. text-transform: none;
  1889. padding-left: 9px;
  1890. }
  1891. >span:hover {
  1892. color: #139609;
  1893. a {
  1894. color: #088f04;
  1895. }
  1896. }
  1897. }
  1898. }
  1899. // 轮播图
  1900. .banner {
  1901. width: 380px;
  1902. height: 214px;
  1903. margin-top: 45px;
  1904. }
  1905. .banner_b_img {
  1906. // 图片部分
  1907. .photo {
  1908. height: 104px;
  1909. margin-top: 10px;
  1910. display: flex;
  1911. }
  1912. .photoL,
  1913. .photoR {
  1914. float: left;
  1915. width: 185px;
  1916. height: 104px;
  1917. position: relative;
  1918. img {
  1919. width: 185px;
  1920. height: 104px;
  1921. }
  1922. span {
  1923. position: absolute;
  1924. top: 0;
  1925. left: 0;
  1926. display: inline-block;
  1927. padding-left: 7px;
  1928. box-sizing: border-box;
  1929. width: 185px;
  1930. height: 22px;
  1931. background-color: rgba(0, 0, 0, 0.5);
  1932. font-weight: 500px;
  1933. font-size: 14px;
  1934. color: #FFFFFF;
  1935. line-height: 22px;
  1936. white-space: nowrap;
  1937. /* 禁止换行 */
  1938. overflow: hidden;
  1939. /* 隐藏超出部分 */
  1940. text-overflow: ellipsis;
  1941. /* 超出部分显示省略号 */
  1942. a {
  1943. color: #fff;
  1944. }
  1945. }
  1946. }
  1947. .photoL {
  1948. margin-right: 10px;
  1949. }
  1950. }
  1951. }
  1952. }
  1953. // 标题
  1954. .scienceTitle {
  1955. height: 37px;
  1956. h5 {
  1957. float: left;
  1958. width: 96px;
  1959. height: 34px;
  1960. font-family: PingFang SC, PingFang SC;
  1961. font-weight: 600;
  1962. font-size: 24px;
  1963. color: #000000;
  1964. line-height: 28px;
  1965. text-align: left;
  1966. font-style: normal;
  1967. text-transform: none;
  1968. margin-right: 20px;
  1969. }
  1970. >p {
  1971. float: left;
  1972. height: 37px;
  1973. line-height: 30px;
  1974. >span {
  1975. display: inline-block;
  1976. //height: 20px;
  1977. line-height: 20px;
  1978. text-align: center;
  1979. margin: 4px 0px 3px;
  1980. padding: 0 20px;
  1981. //border-right: 1px solid #ccc;
  1982. font-weight: 500;
  1983. font-size: 20px;
  1984. cursor: pointer;
  1985. padding-bottom: 11px;
  1986. // >a {
  1987. // display: inline-block;
  1988. // padding-bottom: 11px;
  1989. // font-family: PingFang SC, PingFang SC;
  1990. // font-weight: 500;
  1991. // font-size: 20px;
  1992. // color: #666666;
  1993. // line-height: 20px;
  1994. // font-style: normal;
  1995. // text-transform: none;
  1996. // box-sizing: border-box;
  1997. // }
  1998. .current {
  1999. color: #139602;
  2000. border-bottom: 1px solid #139602;
  2001. }
  2002. }
  2003. >span:nth-child(4) {
  2004. border-right: none;
  2005. }
  2006. >span:hover>a {
  2007. color: #139602;
  2008. border-bottom: 1px solid #139602;
  2009. }
  2010. }
  2011. }
  2012. .box {
  2013. width: 790px;
  2014. height: 570px;
  2015. position: relative;
  2016. overflow: hidden;
  2017. }
  2018. .fade-in {
  2019. animation: fadeIn 1s ease-in-out;
  2020. }
  2021. .fade-enter-from,
  2022. .fade-leave-to {
  2023. opacity: 0;
  2024. }
  2025. .fade-enter-to,
  2026. .fade-leave-from {
  2027. opacity: 1;
  2028. }
  2029. .fade-enter-active,
  2030. .fade-leave-active {
  2031. transition: opacity 1s ease;
  2032. }
  2033. .scienceListBox {
  2034. width: 3160px;
  2035. height: 570px;
  2036. position: absolute;
  2037. top: 0;
  2038. left: 0;
  2039. transition: all 3s linear 0;
  2040. }
  2041. // 标题下列表
  2042. .scienceList {
  2043. width: 790px;
  2044. height: 570px;
  2045. float: left;
  2046. margin-top: 17px;
  2047. >li {
  2048. width: 250px;
  2049. height: 276px;
  2050. float: left;
  2051. margin-right: 20px;
  2052. position: relative;
  2053. img {
  2054. width: 250px;
  2055. height: 220px;
  2056. }
  2057. >p {
  2058. height: 50px;
  2059. width: 248px;
  2060. font-family: PingFang SC, PingFang SC;
  2061. font-weight: 600;
  2062. font-size: 18px;
  2063. color: #333333;
  2064. line-height: 24px;
  2065. text-align: left;
  2066. font-style: normal;
  2067. text-transform: none;
  2068. display: -webkit-box;
  2069. -webkit-box-orient: vertical;
  2070. -webkit-line-clamp: 2;
  2071. /* 限制显示的行数 */
  2072. overflow: hidden;
  2073. text-overflow: ellipsis;
  2074. }
  2075. // >p:hover {
  2076. // color: #139602;
  2077. // }
  2078. }
  2079. >li:hover {
  2080. color: #088f04;
  2081. >p:hover {
  2082. a {
  2083. color: #088f04;
  2084. }
  2085. // color: #139602;
  2086. }
  2087. }
  2088. >li:nth-child(3),
  2089. >li:nth-child(6) {
  2090. margin-right: 0;
  2091. }
  2092. >li::before {
  2093. content: "";
  2094. display: inline-block;
  2095. width: 40px;
  2096. height: 20px;
  2097. position: absolute;
  2098. top: 0;
  2099. right: 0;
  2100. background-image: url("../../static/images/Component 209.png");
  2101. }
  2102. }
  2103. .active {
  2104. border-bottom: 3px solid #139602;
  2105. height: 36px;
  2106. display: inline-block;
  2107. }
  2108. .noSelect {
  2109. border-bottom: 3px solid #fff;
  2110. height: 36px;
  2111. display: inline-block;
  2112. }
  2113. </style>